package com.focustech.crov.persist.mybatis.generator.plugin;

import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;

/**
 * 扩展支持泛型
 * 
 * @author qsy
 * 
 */
public class FullyQualifiedJavaTypeExt extends FullyQualifiedJavaType {

	private FullyQualifiedJavaType parameterType;

	public FullyQualifiedJavaTypeExt(String fullTypeSpecification) {
		super(fullTypeSpecification);
	}

	public FullyQualifiedJavaTypeExt(String fullTypeSpecification,
			FullyQualifiedJavaType parameterType) {
		super(fullTypeSpecification);
		this.parameterType = parameterType;
	}

	@Override
	public String getShortName() {
		String shortName = super.getShortName();
		if (null != parameterType) {
			shortName = shortName + "<" + parameterType.getShortName() + ">";
		}
		return shortName;
	}

	public FullyQualifiedJavaType getParameterType() {
		return parameterType;
	}

	public void setParameterType(FullyQualifiedJavaType parameterType) {
		this.parameterType = parameterType;
	}

}
